package com.sd365.permission.centre.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sd365.common.core.common.pojo.entity.TenantBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.Date;

@ApiModel(value="com.sd365.permission.centre.entity.SysUpgradeLog")
@Table(name = "sys_upgrade_log")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysUpgradeLog extends TenantBaseEntity {
    @Transient
    private SubSystem subSystem;

    @Transient
    private Tenant tenant;

    /**
     * 升级日志标题
     */
    @ApiModelProperty(value="title升级日志标题")
    private String title;
    /**
     * 升级日志内容
     */
    @ApiModelProperty(value="content升级日志内容")
    private String content;
    /**
     * 子系统id
     */
    @ApiModelProperty(value="子系统idsubSystemId")
    private Long subSystemId;
    /**
     * 上一版本
     */
    @ApiModelProperty(value="上一版本oldVersion")
    private String oldVersion;
    /**
     * 这一版本
     */
    @ApiModelProperty(value="这一版本newVersion")
    private String newVersion;
    /**
     * 更新时间
     */
    @NotNull
    @ApiModelProperty(value="更新时间upgradeTime")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date upgradeTime;
    /**
     * 更新备注
     */
    @ApiModelProperty(value="更新备注upgradeRemark")
    private String upgradeRemark;
    /**
     * 升级操作人员
     */
    @ApiModelProperty(value="升级操作人员upgradeOperator")
    private String upgradeOperator;

}
